<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>${sys.sortName!''}</title>
     
	<link rel="stylesheet" type="text/css" href="${basePath}/res/js/jquery-easyui/themes/gray/easyui.css">
	<link rel="stylesheet" type="text/css" href="${basePath}/res/js/jquery-easyui/themes/icon.css">
	<link rel="stylesheet" type="text/css" href="${basePath}/res/js/jquery-easyui/themes/color.css">
	<link rel="stylesheet" type="text/css" href="${basePath}/res/theme/default/css/common.css">
	<link rel="stylesheet" type="text/css" href="${basePath}/res/css/icon.css">
	
	<link rel="stylesheet" type="text/css" href="${basePath}/login/yun/css/style.css">

    <script type="text/javascript" src="${basePath}/res/js/jquery-easyui/jquery.min.js"></script>
    <script type="text/javascript" src="${basePath}/res/js/jquery-easyui/jquery.easyui.min.js"></script>
    <script type="text/javascript" src="${basePath}/res/js/jquery-easyui/locale/easyui-lang-zh_CN.js"></script>
    <script type="text/javascript" src="${basePath}/res/js/common.js"></script>
    
    <script src="${basePath}/login/yun/js/cloud.js" type="text/javascript"></script>

    <script language="javascript">
        $(function () {
            $('.loginbox').css({ 'position': 'absolute', 'left': ($(window).width() - 692) / 2 });
            $(window).resize(function () {
                $('.loginbox').css({ 'position': 'absolute', 'left': ($(window).width() - 692) / 2 });
            })
        });
    </script>
    <style type="text/css">
        .text-danger{
            text-align:center;
            width:100%;
        }
    </style>
</head>

<body style="background-color:#2a65e2; background-image:url(${basePath}/login/yun/images/light.png); background-repeat:no-repeat; background-position:center top; overflow:hidden;">



    <div id="mainBody">
        <div id="cloud1" class="cloud"></div>
        <div id="cloud2" class="cloud"></div>
    </div>
    <div class="loginbody">

        <span class="systemlogo"></span>

        <div class="loginbox">
	        
			<ul>
                <li>
                    <input class="loginuser"  id="user_name" name="user_name"  type="text" value="" />
                    
                </li>
                <li>
                    <input class="loginpwd"  id="password" name="password"  type="password" value="" />
                    
                </li>
                <li >
                
                     <a href="javascript:login();"><button  type="button" style="submit" class="loginbtn" >登 录</button></a>
                    
                    <div style="color:red;text-align:center;padding-top:10px;">
                        <span class="field-validation-valid" data-valmsg-for="Error" data-valmsg-replace="true"></span>
                    </div>
                </li>
            </ul>

        </div>
        
    </div>



    <!-- <div class="loginbm">技术支持:0371-66668888&nbsp;&nbsp;版权所有  2016  <a href="#">XX科技有限公司</a></div> -->

<script> 
            
$(function() {
	//获取焦点样式
	$("#ff :input").focus(function() {
		$(this).parent().addClass("actived");
	}).blur(function() {
		$(this).parent().removeClass("actived");
	});
	
	//设置默认焦点,并将光标移到最后
	{
		var theValue =$("#user_name").val(); 
		$("#user_name").val("").focus().val(theValue); //其原理就是获得焦点后重新把自己复制粘帖一下 
	}
	
	//处理回车事件
	$(window).keydown(function(event){//按键事件
		if(event.keyCode==13) //回车 或 tab键
		{
			var theId = $(':focus').attr("id");
			if(theId == "user_name")
			{//如果焦点是用户名，则将焦点称到密码
				var theValue =$("#password").val(); 
				$("#password").val("").focus().val(theValue); 
			}
			else if(theId == "password")
			{//如果焦点是密码，则直接登录
				login();
			}
		}
	});
	
	
});            

function login() {
	if($("#ff").form('enableValidation').form('validate')) {
		var param = {"user_name":$(":input[name='user_name']").val(), 
					"password":$(":input[name='password']").val(), 
					"sysCode":"${sys.code!''}"};
		$.post("${basePath}/login", param, function(data) {
			if(data.code == "01") {
				location.href = "${basePath}/base/main/index/${sys.code!''}";
			}else {
				showWarnMsg(data.msg);
			}
		});
	}
} 
            
</script>

</body>

</html>




